﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace TjZheng.Domain.DataEntity
{
    [XmlRoot("Controls")]
    public class ControlInfo
    {
        [XmlAttribute("Name")]
        public string Name { get; set; }
        [XmlAttribute("DataType")]
        public string DataType { get; set; }
        [XmlAttribute("OriginalName")]
        public string OriginalName { get; set; }
        [XmlAttribute("DisplayName")]
        public string DisplayName { get; set; }
        [XmlAttribute("ControlType")]
        public string ControlType { get; set; }
        [XmlAttribute("IsRequired")]
        public bool IsRequired { get; set; }
        [XmlAttribute("Length")]
        public int Length { get; set; }
        [XmlAttribute("Regex")]
        public string Regex { get; set; }
        [XmlAttribute("Definition")]
        public string Definition { get; set; }
        [XmlAttribute("Message")]
        public string Message { get; set; }
        [XmlAttribute("Style")]
        public string Style { get; set; }
        [XmlAttribute("IsEditShow")]
        public bool IsEditShow { get; set; }
        [XmlAttribute("IsListShow")]
        public bool IsListShow { get; set; }
        [XmlAttribute("IsQuary")]
        public bool IsQuary { get; set; }
        [XmlAttribute("EditSort")]
        public int EditSort { get; set; }
        [XmlAttribute("ListSort")]
        public int ListSort { get; set; }
        [XmlAttribute("QuarySort")]
        public int QuarySort { get; set; }
        [XmlElement(ElementName = "Control")]
        public List<ControlInfo> Children { get; set; }

        public void InitialControlInfo()
        {
            Children = new List<ControlInfo>();

            ControlInfo objInfoTitle = new ControlInfo();
            objInfoTitle.Name = "InfoTitle";
            objInfoTitle.DataType = "nvarchar(256)";
            objInfoTitle.OriginalName = "信息标题";
            objInfoTitle.DisplayName = "信息标题";
            objInfoTitle.ControlType = "StringBox";
            objInfoTitle.IsRequired = true;
            objInfoTitle.Length = 256;
            objInfoTitle.Regex = string.Empty;
            objInfoTitle.Definition = string.Empty;
            objInfoTitle.Message = "请输入信息标题";
            objInfoTitle.Style = "width:500px;";
            objInfoTitle.IsEditShow = true;
            objInfoTitle.IsListShow = true;
            objInfoTitle.IsQuary = true;
            objInfoTitle.ListSort = 1;
            objInfoTitle.EditSort = 1;
            objInfoTitle.QuarySort = 1;
            Children.Add(objInfoTitle);

            ControlInfo objSubTitle = new ControlInfo();
            objSubTitle.Name = "SubTitle";
            objSubTitle.DataType = "nvarchar(256)";
            objSubTitle.OriginalName = "信息子标题";
            objSubTitle.DisplayName = "信息子标题";
            objSubTitle.ControlType = "StringBox";
            objSubTitle.IsRequired = true;
            objSubTitle.Length = 256;
            objSubTitle.Regex = string.Empty;
            objSubTitle.Definition = string.Empty;
            objSubTitle.Message = "请输入信息子标题";
            objSubTitle.Style = "width:500px;";
            objSubTitle.IsEditShow = true;
            objSubTitle.IsListShow = true;
            objSubTitle.IsQuary = true;
            objSubTitle.ListSort = 2;
            objSubTitle.EditSort = 2;
            objSubTitle.QuarySort = 2;
            Children.Add(objSubTitle);

            ControlInfo objSimpleTitle = new ControlInfo();
            objSimpleTitle.Name = "SimpleTitle";
            objSimpleTitle.DataType = "nvarchar(256)";
            objSimpleTitle.OriginalName = "信息短标题";
            objSimpleTitle.DisplayName = "信息短标题";
            objSimpleTitle.ControlType = "StringBox";
            objSimpleTitle.IsRequired = false;
            objSimpleTitle.Length = 256;
            objSimpleTitle.Regex = string.Empty;
            objSimpleTitle.Definition = string.Empty;
            objSimpleTitle.Message = "请输入信息短标题";
            objSimpleTitle.Style = "width:500px;";
            objSimpleTitle.IsEditShow = false;
            objSimpleTitle.IsListShow = false;
            objSimpleTitle.IsQuary = false;
            objSimpleTitle.ListSort = 3;
            objSimpleTitle.EditSort = 3;
            objSimpleTitle.QuarySort = 3;
            Children.Add(objSimpleTitle);

            ControlInfo objSimpleTitleUrl = new ControlInfo();
            objSimpleTitleUrl.Name = "SimpleTitleUrl";
            objSimpleTitleUrl.DataType = "nvarchar(256)";
            objSimpleTitleUrl.OriginalName = "短标题链接";
            objSimpleTitleUrl.DisplayName = "短标题链接";
            objSimpleTitleUrl.ControlType = "StringBox";
            objSimpleTitleUrl.IsRequired = false;
            objSimpleTitleUrl.Length = 256;
            objSimpleTitleUrl.Regex = string.Empty;
            objSimpleTitleUrl.Definition = string.Empty;
            objSimpleTitleUrl.Message = "请输入短标题链接";
            objSimpleTitleUrl.Style = "width:500px;";
            objSimpleTitleUrl.IsEditShow = false;
            objSimpleTitleUrl.IsListShow = false;
            objSimpleTitleUrl.IsQuary = false;
            objSimpleTitleUrl.ListSort = 4;
            objSimpleTitleUrl.EditSort = 4;
            objSimpleTitleUrl.QuarySort = 4;
            Children.Add(objSimpleTitleUrl);

            ControlInfo objInfoType = new ControlInfo();
            objInfoType.Name = "InfoType";
            objInfoType.DataType = "int";
            objInfoType.OriginalName = "信息类型";
            objInfoType.DisplayName = "信息类型";
            objInfoType.ControlType = "ComboBox";
            objInfoType.IsRequired = true;
            objInfoType.Length = 0;
            objInfoType.Regex = string.Empty;
            objInfoType.Definition = "1|信息1,2|信息2,3|信息3";
            objInfoType.Message = "请选择信息类型";
            objInfoType.Style = string.Empty;
            objInfoType.IsEditShow = true;
            objInfoType.IsListShow = true;
            objInfoType.IsQuary = true;
            objInfoType.ListSort = 5;
            objInfoType.EditSort = 5;
            objInfoType.QuarySort = 5;
            Children.Add(objInfoType);

            ControlInfo objInfoMark = new ControlInfo();
            objInfoMark.Name = "InfoMark";
            objInfoMark.DataType = "nvarchar(256)";
            objInfoMark.OriginalName = "信息标记";
            objInfoMark.DisplayName = "信息标记";
            objInfoMark.ControlType = "StringBox";
            objInfoMark.IsRequired = false;
            objInfoMark.Length = 256;
            objInfoMark.Regex = string.Empty;
            objInfoMark.Definition = string.Empty;
            objInfoMark.Message = "请输入信息标记";
            objInfoMark.Style = "width:500px;";
            objInfoMark.IsEditShow = false;
            objInfoMark.IsListShow = false;
            objInfoMark.IsQuary = false;
            objInfoMark.ListSort = 6;
            objInfoMark.EditSort = 6;
            objInfoMark.QuarySort = 6;
            Children.Add(objInfoMark);

            ControlInfo objInfoTag = new ControlInfo();
            objInfoTag.Name = "InfoTag";
            objInfoTag.DataType = "nvarchar(512)";
            objInfoTag.OriginalName = "信息标签";
            objInfoTag.DisplayName = "信息标签";
            objInfoTag.ControlType = "StringBox";
            objInfoTag.IsRequired = false;
            objInfoTag.Length = 512;
            objInfoTag.Regex = string.Empty;
            objInfoTag.Definition = string.Empty;
            objInfoTag.Message = "请输入信息标签";
            objInfoTag.Style = "width:500px;";
            objInfoTag.IsEditShow = false;
            objInfoTag.IsListShow = false;
            objInfoTag.IsQuary = false;
            objInfoTag.ListSort = 7;
            objInfoTag.EditSort = 7;
            objInfoTag.QuarySort = 7;
            Children.Add(objInfoTag);

            ControlInfo objMinPic = new ControlInfo();
            objMinPic.Name = "MinPic";
            objMinPic.DataType = "nvarchar(256)";
            objMinPic.OriginalName = "信息小图";
            objMinPic.DisplayName = "信息小图";
            objMinPic.ControlType = "UpLoadNativeImage";
            objMinPic.IsRequired = false;
            objMinPic.Length = 256;
            objMinPic.Regex = string.Empty;
            objMinPic.Definition = string.Empty;
            objMinPic.Message = "请输入信息小图";
            objMinPic.Style = string.Empty;
            objMinPic.IsEditShow = true;
            objMinPic.IsListShow = false;
            objMinPic.IsQuary = false;
            objMinPic.ListSort = 8;
            objMinPic.EditSort = 8;
            objMinPic.QuarySort = 8;
            Children.Add(objMinPic);

            ControlInfo objMidPic = new ControlInfo();
            objMidPic.Name = "MidPic";
            objMidPic.DataType = "nvarchar(256)";
            objMidPic.OriginalName = "信息中图";
            objMidPic.DisplayName = "信息中图";
            objMidPic.ControlType = "UpLoadNativeImage";
            objMidPic.IsRequired = false;
            objMidPic.Length = 256;
            objMidPic.Regex = string.Empty;
            objMidPic.Definition = string.Empty;
            objMidPic.Message = "请输入信息中图";
            objMidPic.Style = string.Empty;
            objMidPic.IsEditShow = false;
            objMidPic.IsListShow = false;
            objMidPic.IsQuary = false;
            objMidPic.ListSort = 9;
            objMidPic.EditSort = 9;
            objMidPic.QuarySort = 9;
            Children.Add(objMidPic);

            ControlInfo objMaxPic = new ControlInfo();
            objMaxPic.Name = "MaxPic";
            objMaxPic.DataType = "nvarchar(256)";
            objMaxPic.OriginalName = "信息大图";
            objMaxPic.DisplayName = "信息大图";
            objMaxPic.ControlType = "UpLoadNativeImage";
            objMaxPic.IsRequired = false;
            objMaxPic.Length = 256;
            objMaxPic.Regex = string.Empty;
            objMaxPic.Definition = string.Empty;
            objMaxPic.Message = "请输入信息大图";
            objMaxPic.Style = string.Empty;
            objMaxPic.IsEditShow = false;
            objMaxPic.IsListShow = false;
            objMaxPic.IsQuary = false;
            objMaxPic.ListSort = 10;
            objMaxPic.EditSort = 10;
            objMaxPic.QuarySort = 10;
            Children.Add(objMaxPic);

            ControlInfo objTargetUrl = new ControlInfo();
            objTargetUrl.Name = "TargetUrl";
            objTargetUrl.DataType = "nvarchar(512)";
            objTargetUrl.OriginalName = "跳转地址";
            objTargetUrl.DisplayName = "跳转地址";
            objTargetUrl.ControlType = "StringBox";
            objTargetUrl.IsRequired = false;
            objTargetUrl.Length = 512;
            objTargetUrl.Regex = string.Empty;
            objTargetUrl.Definition = string.Empty;
            objTargetUrl.Message = "请输入跳转地址";
            objTargetUrl.Style = "width:500px;";
            objTargetUrl.IsEditShow = true;
            objTargetUrl.IsListShow = true;
            objTargetUrl.IsQuary = false;
            objTargetUrl.ListSort = 11;
            objTargetUrl.EditSort = 11;
            objTargetUrl.QuarySort = 11;
            Children.Add(objTargetUrl);

            ControlInfo objPhoneTargetUrl = new ControlInfo();
            objPhoneTargetUrl.Name = "PhoneTargetUrl";
            objPhoneTargetUrl.DataType = "nvarchar(512)";
            objPhoneTargetUrl.OriginalName = "触屏版跳转地址";
            objPhoneTargetUrl.DisplayName = "触屏版跳转地址";
            objPhoneTargetUrl.ControlType = "StringBox";
            objPhoneTargetUrl.IsRequired = false;
            objPhoneTargetUrl.Length = 512;
            objPhoneTargetUrl.Regex = string.Empty;
            objPhoneTargetUrl.Definition = string.Empty;
            objPhoneTargetUrl.Message = "请输入触屏版跳转地址";
            objPhoneTargetUrl.Style = "width:500px;";
            objPhoneTargetUrl.IsEditShow = false;
            objPhoneTargetUrl.IsListShow = false;
            objPhoneTargetUrl.IsQuary = false;
            objPhoneTargetUrl.ListSort = 12;
            objPhoneTargetUrl.EditSort = 12;
            objPhoneTargetUrl.QuarySort = 12;
            Children.Add(objPhoneTargetUrl);

            ControlInfo objInfoSummary = new ControlInfo();
            objInfoSummary.Name = "InfoSummary";
            objInfoSummary.DataType = "nvarchar(1024)";
            objInfoSummary.OriginalName = "信息摘要";
            objInfoSummary.DisplayName = "信息摘要";
            objInfoSummary.ControlType = "TextArea";
            objInfoSummary.IsRequired = false;
            objInfoSummary.Length = 1024;
            objInfoSummary.Regex = string.Empty;
            objInfoSummary.Definition = string.Empty;
            objInfoSummary.Message = "请输入信息摘要";
            objInfoSummary.Style = string.Empty;
            objInfoSummary.IsEditShow = false;
            objInfoSummary.IsListShow = false;
            objInfoSummary.IsQuary = false;
            objInfoSummary.ListSort = 13;
            objInfoSummary.EditSort = 13;
            objInfoSummary.QuarySort = 13;
            Children.Add(objInfoSummary);

            ControlInfo objCreateDate = new ControlInfo();
            objCreateDate.Name = "CreateDate";
            objCreateDate.DataType = "datetime"; ;
            objCreateDate.OriginalName = "创建时间";
            objCreateDate.DisplayName = "创建时间";
            objCreateDate.ControlType = "DateTimeBox";
            objCreateDate.IsRequired = false;
            objCreateDate.Length = 0;
            objCreateDate.Regex = string.Empty;
            objCreateDate.Definition = string.Empty;
            objCreateDate.Message = "请输入创建时间";
            objCreateDate.Style = string.Empty;
            objCreateDate.IsEditShow = false;
            objCreateDate.IsListShow = false;
            objCreateDate.IsQuary = false;
            objCreateDate.ListSort = 14;
            objCreateDate.EditSort = 14;
            objCreateDate.QuarySort = 14;
            Children.Add(objCreateDate);

            ControlInfo objModifyDate = new ControlInfo();
            objModifyDate.Name = "ModifyDate";
            objModifyDate.DataType = "datetime"; ;
            objModifyDate.OriginalName = "修改时间";
            objModifyDate.DisplayName = "修改时间";
            objModifyDate.ControlType = "DateTimeBox";
            objModifyDate.IsRequired = false;
            objModifyDate.Length = 0;
            objModifyDate.Regex = string.Empty;
            objModifyDate.Definition = string.Empty;
            objModifyDate.Message = "请输入修改时间";
            objModifyDate.Style = string.Empty;
            objModifyDate.IsEditShow = false;
            objModifyDate.IsListShow = false;
            objModifyDate.IsQuary = false;
            objModifyDate.ListSort = 15;
            objModifyDate.EditSort = 15;
            objModifyDate.QuarySort = 15;
            Children.Add(objModifyDate);

            ControlInfo objIsRelease = new ControlInfo();
            objIsRelease.Name = "IsRelease";
            objIsRelease.DataType = "int";
            objIsRelease.OriginalName = "是否发布";
            objIsRelease.DisplayName = "是否发布";
            objIsRelease.ControlType = "CheckBox";
            objIsRelease.IsRequired = false;
            objIsRelease.Length = 0;
            objIsRelease.Regex = string.Empty;
            objIsRelease.Definition = "1|是,0|否";
            objIsRelease.Message = "请输入是否发布";
            objIsRelease.Style = string.Empty;
            objIsRelease.IsEditShow = true;
            objIsRelease.IsListShow = true;
            objIsRelease.IsQuary = true;
            objIsRelease.ListSort = 16;
            objIsRelease.EditSort = 16;
            objIsRelease.QuarySort = 16;
            Children.Add(objIsRelease);

            ControlInfo objSortIndex = new ControlInfo();
            objSortIndex.Name = "SortIndex";
            objSortIndex.DataType = "int";
            objSortIndex.OriginalName = "排序标识";
            objSortIndex.DisplayName = "排序标识";
            objSortIndex.ControlType = "NumberBox";
            objSortIndex.IsRequired = false;
            objSortIndex.Length = 0;
            objSortIndex.Regex = string.Empty;
            objSortIndex.Definition = string.Empty;
            objSortIndex.Message = "请输入排序标识";
            objSortIndex.Style = string.Empty;
            objSortIndex.IsEditShow = false;
            objSortIndex.IsListShow = false;
            objSortIndex.IsQuary = false;
            objSortIndex.ListSort = 17;
            objSortIndex.EditSort = 17;
            objSortIndex.QuarySort = 17;
            Children.Add(objSortIndex);

            ControlInfo objI1 = new ControlInfo();
            objI1.Name = "I1";
            objI1.DataType = "int";
            objI1.OriginalName = "I1";
            objI1.DisplayName = "I1";
            objI1.ControlType = "NumberBox";
            objI1.IsRequired = false;
            objI1.Length = 0;
            objI1.Regex = string.Empty;
            objI1.Definition = string.Empty;
            objI1.Message = "请输入I1";
            objI1.Style = string.Empty;
            objI1.IsEditShow = false;
            objI1.IsListShow = false;
            objI1.IsQuary = false;
            objI1.ListSort = 18;
            objI1.EditSort = 18;
            objI1.QuarySort = 18;
            Children.Add(objI1);

            ControlInfo objI2 = new ControlInfo();
            objI2.Name = "I2";
            objI2.DataType = "int";
            objI2.OriginalName = "I2";
            objI2.DisplayName = "I2";
            objI2.ControlType = "NumberBox";
            objI2.IsRequired = false;
            objI2.Length = 0;
            objI2.Regex = string.Empty;
            objI2.Definition = string.Empty;
            objI2.Message = "请输入I2";
            objI2.Style = string.Empty;
            objI2.IsEditShow = false;
            objI2.IsListShow = false;
            objI2.IsQuary = false;
            objI2.ListSort = 19;
            objI2.EditSort = 19;
            objI2.QuarySort = 19;
            Children.Add(objI2);

            ControlInfo objI3 = new ControlInfo();
            objI3.Name = "I3";
            objI3.DataType = "int";
            objI3.OriginalName = "I3";
            objI3.DisplayName = "I3";
            objI3.ControlType = "NumberBox";
            objI3.IsRequired = false;
            objI3.Length = 0;
            objI3.Regex = string.Empty;
            objI3.Definition = string.Empty;
            objI3.Message = "请输入I3";
            objI3.Style = string.Empty;
            objI3.IsEditShow = false;
            objI3.IsListShow = false;
            objI3.IsQuary = false;
            objI3.ListSort = 20;
            objI3.EditSort = 20;
            objI3.QuarySort = 20;
            Children.Add(objI3);

            ControlInfo objS1 = new ControlInfo();
            objS1.Name = "S1";
            objS1.DataType = "nvarchar(256)";
            objS1.OriginalName = "S1";
            objS1.DisplayName = "S1";
            objS1.ControlType = "StringBox";
            objS1.IsRequired = false;
            objS1.Length = 256;
            objS1.Regex = string.Empty;
            objS1.Definition = string.Empty;
            objS1.Message = "请输入S1";
            objS1.Style = "width:500px;";
            objS1.IsEditShow = false;
            objS1.IsListShow = false;
            objS1.IsQuary = false;
            objS1.ListSort = 21;
            objS1.EditSort = 21;
            objS1.QuarySort = 21;
            Children.Add(objS1);

            ControlInfo objS2 = new ControlInfo();
            objS2.Name = "S2";
            objS2.DataType = "nvarchar(512)";
            objS2.OriginalName = "S2";
            objS2.DisplayName = "S2";
            objS2.ControlType = "StringBox";
            objS2.IsRequired = false;
            objS2.Length = 512;
            objS2.Regex = string.Empty;
            objS2.Definition = string.Empty;
            objS2.Message = "请输入S2";
            objS2.Style = "width:500px;";
            objS2.IsEditShow = false;
            objS2.IsListShow = false;
            objS2.IsQuary = false;
            objS2.ListSort = 22;
            objS2.EditSort = 22;
            objS2.QuarySort = 22;
            Children.Add(objS2);

            ControlInfo objS3 = new ControlInfo();
            objS3.Name = "S3";
            objS3.DataType = "nvarchar(1024)";
            objS3.OriginalName = "S3";
            objS3.DisplayName = "S3";
            objS3.ControlType = "StringBox";
            objS3.IsRequired = false;
            objS3.Length = 1024;
            objS3.Regex = string.Empty;
            objS3.Definition = string.Empty;
            objS3.Message = "请输入S3";
            objS3.Style = "width:500px;";
            objS3.IsEditShow = false;
            objS3.IsListShow = false;
            objS3.IsQuary = false;
            objS3.ListSort = 23;
            objS3.EditSort = 23;
            objS3.QuarySort = 23;
            Children.Add(objS3);

            ControlInfo objInfoData = new ControlInfo();
            objInfoData.Name = "InfoData";
            objInfoData.DataType = "text"; ;
            objInfoData.OriginalName = "信息内容";
            objInfoData.DisplayName = "信息内容";
            objInfoData.ControlType = "Ueditor";
            objInfoData.IsRequired = false;
            objInfoData.Length = 0;
            objInfoData.Regex = string.Empty;
            objInfoData.Definition = string.Empty;
            objInfoData.Message = "请输入信息内容";
            objInfoData.Style = "width: 800px; height: 800px;";
            objInfoData.IsEditShow = false;
            objInfoData.IsListShow = false;
            objInfoData.IsQuary = false;
            objInfoData.ListSort = 24;
            objInfoData.EditSort = 24;
            objInfoData.QuarySort = 24;
            Children.Add(objInfoData);

        }
    }
}
